//
//  MacosHeader.h
//  BaseSwift
//
//  Created by ghwang on 2019/7/24.
//  Copyright © 2019 ghwang. All rights reserved.
//

#ifndef MacosHeader_h
#define MacosHeader_h

#import "UIView+SDAutoLayout.h"
#import <EasyNavigation/EasyNavigation.h>
#import "SPUtil.h"
#import "BaseSwift-Swift.h"

#define kUserSpan MKCoordinateSpanMake(2.818404, 2.831468)
#define kUserSpanAround MKCoordinateSpanMake(2.118404*0.01, 2.131468*0.01)


#define SCREEN_WIDTH           [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT          [UIScreen mainScreen].bounds.size.height
#define SCREEN_BOUNDS          [UIScreen mainScreen].bounds

#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)
#define IS_IPHONE_4_OR_LESS (IS_IPHONE && SCREEN_MAX_LENGTH < 568.0)
#define IS_IPHONE_5 (IS_IPHONE && SCREEN_MAX_LENGTH == 568.0)
#define IS_IPHONE_6 (IS_IPHONE && SCREEN_MAX_LENGTH == 667.0)
#define IS_IPHONE_6P (IS_IPHONE && SCREEN_MAX_LENGTH == 736.0)


#define IS_iPhoneX (SCREEN_WIDTH >= 375.f && SCREEN_HEIGHT >= 812.f ? YES : NO)
#define HT_StatusBarHeight      (IS_iPhoneX ? 44.f : 20.f)
#define HT_NavigationBarHeight  44.f
#define HT_TabbarHeight         (IS_iPhoneX ? (49.f+34.f) : 49.f)
#define HT_TabbarSafeBottomMargin         (IS_iPhoneX ? 34.f : 0.f)
#define HT_StatusBarAndNavigationBarHeight  (IS_iPhoneX ? 88.f : 64.f)

#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))
#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT))
#endif /* MacosHeader_h */
